{extend name='main'}

{block name="button"}
<!-- <button data-open='{:url("MarketAdd")}' data-title="添加商品" class='layui-btn layui-btn-sm layui-btn-primary'>添加商品</button> -->

{/block}

{block name="content"}
<div class="think-box-shadow">
    <fieldset>
        <legend>条件搜索</legend>
        <form class="layui-form layui-form-pane form-search" action="{:request()->url()}" onsubmit="return false" method="get" autocomplete="off">
            <div class="layui-form-item layui-inline">
                <label class="layui-form-label">会员id</label>
                <div class="layui-input-inline">
                    <input name="id" value="{$Think.get.id|default=''}" placeholder="请输入会员ID" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item layui-inline">
                <label class="layui-form-label">会员昵称</label>
                <div class="layui-input-inline">
                    <input name="name" value="{$Think.get.name|default=''}" placeholder="请输入会员昵称" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item layui-inline">
                <label class="layui-form-label">认证状态</label>
                <div class="layui-input-inline">
                    <select class="layui-select" name="status">
                       {foreach ['0'=>'全部状态','1'=>'待认证','2'=>'认证成功','3'=>'认证拒绝'] as $k=>$v}
                        <!--{eq name='Think.get.status' value='$k.""'}-->
                        <option selected value="{$k}">{$v}</option>
                        <!--{else}-->
                        <option value="{$k}">{$v}</option>
                        <!--{/eq}-->
                        {/foreach}
                    </select>
                </div>
            </div>
            
            <div class="layui-form-item layui-inline">
                <button class="layui-btn layui-btn-primary"><i class="layui-icon">&#xe615;</i> 搜 索</button>
            </div>
        </form>
    </fieldset>

    <script>form.render()</script>

    <table class="layui-table margin-top-10" lay-skin="line">

        <thead>
        <tr>
          <th>会员id</th>
          <th>真实姓名</th>
          <th>联系电话</th>
          <th>性别</th>
          <th>会员昵称</th>
          <th>是否认证</th>
          <th>微信openid</th>
       
          <th>关注时间</th>
          <th>操作</th>
        </tr>
        </thead>

        <tbody>
        {foreach $list as $key=>$vo}    
        <tr>
        <td>{$vo.id}</td>
        <td><a  data-open="{:url('memberInfo')}?id={$vo.id}">{$vo.truename|default='--'}</a></td>
        <td>{$vo.mobile|default='--'}</td>
        <td>{switch name="$vo.sex" }
                {case value="1" }男{/case}
                {case value="2"}女{/case}
                {default /}未知
            {/switch}
        </td>
        <td>{$vo.wechat_nickname}</td>
        <td>
          {switch name="$vo.status" }
          {case value="1" }<span class="layui-badge">待认证</span>{/case}
                {case value="2"}<span class="layui-badge layui-bg-green">认证通过</span>{/case}
                {case value="3"}<span class="layui-badge">认证拒绝</span>{/case}
                {default /}<span class="layui-badge">未认证</span>
            {/switch}
        </td>
        <td>{$vo.wechat_openid}</td>
        
        <td>{$vo.created_at|format_datetime}</td>
        <td class='text-left nowrap'>
            {if auth("member/index/memberInfo")}
            <a data-dbclick class="layui-btn layui-btn-sm" data-title="会员详情" data-open="{:url('memberInfo')}?id={$vo.id}"">会员详情</a>
            {/if}
            {if auth("member/index/integral")}
            <a data-dbclick class="layui-btn layui-btn-sm" data-title="会员积分" data-open="{:url('integral')}?id={$vo.id}"">会员积分</a>
            {/if}

            {if auth("member/index/chareg")}
            <a data-dbclick class="layui-btn layui-btn-sm" data-title="充值记录" data-open="{:url('chareg')}?id={$vo.id}">充值记录</a>
            {/if}

            {if auth("member/index/jobRecord")}
            <a class="layui-btn layui-btn-sm layui-btn-warm" data-open="{:url('jobRecord')}?id={$vo.id}" >兼职记录</a>
            {/if}

             {if auth("member/index/pubjobRecord")}
            <a class="layui-btn layui-btn-sm layui-btn-warm" data-open="{:url('pubjobRecord')}?id={$vo.id}" >兼职发布记录</a>
            {/if}

          

        </td>
        </tr>
        {/foreach}
        </tbody>
    </table>

    {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}

</div>

{/block}
